/* ArrayOperations - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */

public class ArrayOperations {
	public static void copy(byte[] src, int srcOffset, byte[] dest, int destOffset, int length) {
		if (src == dest) {
			if (srcOffset == destOffset)
				return;
			if (destOffset > srcOffset && destOffset < srcOffset + length) {
				length--;
				srcOffset += length;
				destOffset += length;
				length = srcOffset - length;
				length += 7;
				while (srcOffset >= length) {
					dest[destOffset--] = src[srcOffset--];
					dest[destOffset--] = src[srcOffset--];
					dest[destOffset--] = src[srcOffset--];
					dest[destOffset--] = src[srcOffset--];
					dest[destOffset--] = src[srcOffset--];
					dest[destOffset--] = src[srcOffset--];
					dest[destOffset--] = src[srcOffset--];
					dest[destOffset--] = src[srcOffset--];
				}
				length -= 7;
				while (srcOffset >= length)
					dest[destOffset--] = src[srcOffset--];
				return;
			}
		}
		length += srcOffset;
		length -= 7;
		while (srcOffset < length) {
			dest[destOffset++] = src[srcOffset++];
			dest[destOffset++] = src[srcOffset++];
			dest[destOffset++] = src[srcOffset++];
			dest[destOffset++] = src[srcOffset++];
			dest[destOffset++] = src[srcOffset++];
			dest[destOffset++] = src[srcOffset++];
			dest[destOffset++] = src[srcOffset++];
			dest[destOffset++] = src[srcOffset++];
		}
		length += 7;
		while (srcOffset < length)
			dest[destOffset++] = src[srcOffset++];
	}
}
